<template>
    <p>我是子组件</p>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue"
export default defineComponent({
    name: "AsyncComponents",
    components: {},
    setup() {
        // 异步组件
        return new Promise((resolve, reject) => {
            setTimeout(() => {
                resolve({
                    msg: "abc",
                })
            }, 2000)
        })
    },
})
</script>

<style scoped>
p {
    width: 200px;
    height: 200px;
    background-color: #c2bebe;
}
</style>
